-- GENERATED SPELL FOR [Cabal Executioner] --


function spell0_18632(pUnit, Event) --@Enrage,Self--
pUnit:FullCastSpellOnTarget(30485,pUnit)
pUnit:RegisterEvent('Sorts_18632', 616, 1)
end

function spell1_18632(pUnit, Event) --@Execute,n/a--
pUnit:FullCastSpellOnTarget(7160,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18632', 0, 1)
end

function spell2_18632(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15578,pUnit)
pUnit:RegisterEvent('Sorts_18632', 589, 1)
end

function spell3_18632(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(33500,pUnit)
pUnit:RegisterEvent('Sorts_18632', 2000, 1)
end

function Sorts_18632(pUnit, Event)
local choix_sorts_18632 = math.random(0, 3)
if choix_sorts_18632 == 0 then
pUnit:RegisterEvent('spell0_18632', 1, 1)
end
if choix_sorts_18632 == 1 then
pUnit:RegisterEvent('spell1_18632', 1, 1)
end
if choix_sorts_18632 == 2 then
pUnit:RegisterEvent('spell2_18632', 1, 1)
end
if choix_sorts_18632 == 3 then
pUnit:RegisterEvent('spell3_18632', 1, 1)
end
end

function mob18632_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18632', math.random(1500, 3000), 1)
end

function mob18632_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18632_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18632_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18632, 1, 'mob18632_Action')
RegisterUnitEvent(18632, 2, 'mob18632_Leave')
RegisterUnitEvent(18632, 3, 'mob18632_Kill')
RegisterUnitEvent(18632, 4, 'mob18632_Die')
